﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using Sistema.Dominio.ValidationAttribute;
using Microsoft.Practices.EnterpriseLibrary.Validation.Validators;


namespace Sistema.Dominio
{
    public class EmailVO : EntidadeValidavel
    {
        private String _email;
        private bool _newsletter;
        private bool _emailPreferencial;

        public EmailVO()
            :base(typeof(EmailVO))
        {
            this._email = String.Empty;
            this._newsletter = false;
            this.EmailPreferencial = false;
        }

        [EmailAttribute]
        public String Email
        {
            get { return _email;}
            set { _email = value; base.RaisePropertyChanged("Email");}
        }

        public bool Newsletter
        {
            get { return _newsletter; }
            set { _newsletter = value; }
        }

        public bool EmailPreferencial
        {
            get { return _emailPreferencial; }
            set { _emailPreferencial = value; }

        }
    }
}
